/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef TIMELINE_SRV_PROXY_H
#define TIMELINE_SRV_PROXY_H

#include "iremote_proxy.h"
#include <nocopyable.h>

#include "itimeline.h"

namespace OHOS {
namespace Msdp {
class TimelineSrvProxy : public IRemoteProxy<ITimeline> {
public:
    explicit TimelineSrvProxy(const sptr<IRemoteObject>& impl)
        : IRemoteProxy<ITimeline>(impl) {}
    ~TimelineSrvProxy() = default;
    DISALLOW_COPY_AND_MOVE(TimelineSrvProxy);

    virtual void Subscribe(const TimelineDataUtils::TimelineArea& area, const sptr<ITimelineCallback>& callback) override;
    virtual void UnSubscribe(const TimelineDataUtils::TimelineArea& area, const sptr<ITimelineCallback>& callback) override;
    virtual bool SetPositionState(int32_t homevalue, int32_t companyvalue) override;
    virtual bool SetHomePosition(double longitude, double latitude)override;
    virtual bool SetCompanyPosition(double longitude, double latitude)override;
    virtual bool SetSleepTime(int32_t sleeptime, int32_t wakeuptime)override;
    virtual bool SetRestTime(int32_t resttimestart, int32_t resttimeend)override;
    virtual bool SetWorkTime(int32_t worktimestart, int32_t worktimeend)override;
    virtual uint32_t GetSleepTime()override;
    virtual uint32_t GetWakeupTime()override;
    virtual uint32_t GetRestTimeStart()override;
    virtual uint32_t GetRestTimeEnd()override;
    virtual uint32_t GetWorkTimeStart()override;
    virtual uint32_t GetWorkTimeEnd()override;
    virtual TimelineDatabaseInfo::ForcecastPosition GetForcecast(uint32_t time)override;
private:
    static inline BrokerDelegator<TimelineSrvProxy> delegator_;
};
} // namespace Msdp
} // namespace OHOS
#endif // TIMELINE_SRV_PROXY_H